With development of communications technologies, communication between people becomes increasingly convenient. A contact list used for storing contact information is provided on many terminals. When a user needs to communicate with a contact or perform another operation on a contact, the user needs to find corresponding contact information in the contact list, and then performs a corresponding operation. In actual application, some contact information, that is, abnormal contact information, is often added to the contact list against the will of the user. The abnormal contact information is, for example, contact information that is added to the contact list by a third-party application installed on a terminal.
In a related technology, whether contact information is abnormal contact information is generally detected according to various rules preset in a rule base. A specific process includes: A terminal obtains, from a server, a rule base pre-established by the server. When new contact information is generated, the terminal analyzes a name, a telephone number, and the like in the contact information to detect whether the contact information matches information indicated by a rule in the rule base. If the contact information matches the information indicated by the rule in the rule base, it indicates that the contact information is abnormal contact information. For example, in a rule in the rule base, when a name of contact information is empty and a label of a telephone number of the contact information carries a special character such as “*”, it indicates that the contact information is abnormal contact information. The server regularly updates the rule base, and a rule is usually manually added or deleted according to experience.
During implementation of the embodiments of the present disclosure, the inventor finds that the foregoing technology has at least the following problem:
In the related technology, the rule base is established by the server according to a preset rule. Each time when the rule base is updated, a rule is manually added to or deleted from the rule base. A quantity of rules in the rule base is relatively small, and the rules are relatively monotonous. Therefore, the accuracy and efficiency of detecting abnormal contact information are relatively low.